.anomaly-card {
  position: relative;
  width: 100%;
  height: 6rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.2rem;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: rgba(1, 86, 192, 0.40);
  border-radius: 0.4rem;
  
  // 关闭图标
  .close-icon {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    font-size: 0.8rem;
    opacity: 0.7;
    z-index: 2;
    
    &:hover {
      opacity: 1;
    }
    
    .prohibited-icon {
      width: 0.9rem;
      height: 0.9rem;
      background-image: url('../../../../../../../../../public/images/搁置-未选中.svg');
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-position: center;
      &.prohibited-icon-active {
        background-image: url('../../../../../../../../../public/images/铃铛-未选中.svg');
        &:hover {
          background-image: url('../../../../../../../../../public/images/铃铛-选中.svg');
        }
      }
      &:hover {
        background-image: url('../../../../../../../../../public/images/搁置-选中.svg');
      }
    }
  }

  .chart-icon {
    position: absolute;
    top: 0.4rem;
    right: 1.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
    z-index: 2;
    
    &:hover {
      opacity: 1;
    }
    
    .echarts-icon {
      width: 0.9rem;
      height: 0.9rem;
      background-image: url('../../../../../../../../../public/images/ChartIcon.svg');
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-position: center;
      &:hover {
        background-image: url('../../../../../../../../../public/images/ChartIcon.svg');
      }
    }
  }
  
  // 卡片头部
  .card-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
    
    .card-type {
      display: flex;
      align-items: center;
      font-size: 0.7rem;
      font-weight: bold;
      margin-right: 1rem;
      
      .card-type-name {
        width: 6.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .type-icon {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 1rem;
        height: 1rem;
        border-radius: 50%;
        margin-right: 0.3rem;
        font-weight: bold;
        font-size: 0.6rem;
      }
      
      .type-icon-red {
        background-image: url('../../../../../../../../../public/images/icon-报警2.svg');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-position: center;
      }
      
      .type-icon-yellow {
        background-image: url('../../../../../../../../../public/images/icon-预警2.svg');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-position: center;
      }
      
      .type-icon-green {
        background-image: url('../../../../../../../../../public/images/icon-正常2.svg');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-position: center;
      }
      
      .type-icon-gray {
        background-image: url('../../../../../../../../../public/images/搁置-未选中.svg');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-position: center;
      }
    }
    
    .card-type-red {
      color: #ff3333;
    }
    
    .card-type-yellow {
      color: #ffcc00;
    }
    
    .card-type-green {
      color: #00cc00;
    }
    
    .card-type-gray {
      color: #cccccc;
    }
  }
  
  // 卡片内容
  .card-content {
    flex: 1;
    
    .code-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.3rem;
    }
    
    .code {
      width: 10rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 0.6rem;
      font-weight: bold;
    }
    
    .real-time-value {
      font-size: 0.7rem;
      padding: 0.1rem 0.3rem;
      border-radius: 0.1rem;
      font-weight: bold;
      text-align: right;
    }
    
    .real-time-value-red {
      color: #ff3333;
    }
    
    .real-time-value-yellow {
      color: #ffcc00;
    }
    
    .real-time-value-green {
      color: #00cc00;
    }
    
    .real-time-value-gray {
      color: #cccccc;
    }
    
    .location, .update-time {
      font-size: 0.6rem;
      opacity: 0.8;
      margin-bottom: 0.2rem;
    }
  }
  
  // 卡片动作
  .card-action {
    text-align: right;
    
    .action-label {
      font-size: 0.7rem;
      font-weight: bold;
    }
  }
}

// 红色卡片
.anomaly-card-red {
  position: relative;
}

// 黄色卡片
.anomaly-card-yellow {
  position: relative;
}

// 绿色卡片
.anomaly-card-green {
  position: relative;
}

// 灰色卡片
.anomaly-card-gray {
  position: relative;
}

// 选中状态的卡片
.anomaly-card-selected {
  transform: scale(1.02);
  box-shadow: 0 0 0.5rem rgba(0, 160, 255, 0.8);
  border: 0.05rem solid #00a0ff !important;
  background-color: rgba(1, 86, 192, 0.75);
} 